<script>
var m_x;
$(window).on('touchstart', function(e){
	m_x = e.originalEvent.touches[0].pageX;
});
$(window).on('touchend', function(e){
	var m_abs = m_x-e.originalEvent.changedTouches[0].pageX;
	if (150<Math.abs(m_abs)) {
		(0 < m_abs) ? lc_href('下一页') : lc_href('上一页');
	}
});
function onkey(e){  
	if ('INPUT' == e.srcElement.nodeName) return;
	if (37 == e.keyCode) lc_href('上一页');
	if (39 == e.keyCode) lc_href('下一页');
}  
function lc_href(a_d){  
	location = $('ul.pagination').find('a:contains('+a_d+')').attr('href');
}
</script>
<body onkeydown="onkey(event)"></body>  
